package test.a02demo2;

public class Teacher extends Person{
    private String subject;
    public Teacher() {
    }

    public Teacher(String id, int age, String subject) {
        super(id, age);
        this.subject = subject;
    }
    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }
    public void teach(){
        System.out.println("教学");
    }
}
